{% load i18n lfs_tags %}

{% include "lfs/catalog/categories/product/products_navigation.html" %}

{% sorting %}

<h1 class="first-heading">
    {{ category.name }}
</h1>
<div class="description">
    {{ category.description|safe }}
</div>
<div id="content1" class="normal-deal-list cf">
<div id="products">
    <table class="lfs-default">
        {% for col in products %}
            {% for product in col %}
        <tr class="product-row">
                 <div class="cover">
                    <a target="_blank" href="/shop/{{shop.shop_owner}}"><img width="312" height="189"  src="{{product.image.url_100x100}} "/></a>
                </div>
{%comment%}
                    <div>
                        <div class="product-title">{{ product.name }}</div>
                        <div class="product-description">{{ product.obj.get_short_description|safe }}</div>
                    </div>
{%endcomment%}

                    {% category_product_prices_gross product.obj.id %}

                    <div class="product-price">
                        {% if price_starting_from %}
                            {% trans "Starting at" %}
                        {% endif %}
                        {% if product.obj.get_for_sale %}
                           <span class="for-sale-standard-price">{{ standard_price|currency:request }}*</span>
                           <span class="for-sale-price">{{ price|currency:request }}*</span>
                        {% else %}
                            <span class="standard-price">{{ price|currency:request }}*</span>
                        {% endif %}
                        {% if product.price_unit %}
                            / {{ product.price_unit }}
                        {% endif %}
                        {% if product.obj.get_active_packing_unit %}
                            <div class="base-price">
                                {{ base_packing_price|currency:request }}* / {{ product.obj.get_packing_info.1 }}
                            </div>
                        {% endif %}
                        {% if product.obj.get_active_base_price %}
                            <div class="base-price">
                                {% if base_price_starting_from %}
                                    {% trans "Starting at" %}
                                {% endif %}
                                {{ base_price|currency:request }}*
                                {% if product.obj.get_base_price_unit %}
                                    / {{ product.obj.get_base_price_unit }}
                                {% endif %}
                            </div>
                        {% endif %}
                        <div class="price-disclaimer">
                            {% if product.price_includes_tax %}
                                {% trans '*inc. VAT' %}
                            {% else  %}
                                {% trans '*exc. VAT' %}
                            {% endif %}
                        </div>
                    </div>
                    <div class="details-button">
                        <a class="button emphasized"
                           href="{% url lfs_product product.slug %}">{% trans 'Details' %}
                        </a>
                    </div>
                </td>
            {% endfor %}
        </tr>
        {% endfor %}
    </table>
</div>
